home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games Extra 1996 September / Amiga Games Extra CD-ROM 9-1996.iso / userbox / publicdomain / vim-4.2 / src / ops.h < prev    next >
Text File  |  1996-06-16  |  2KB  |  70 lines

  1. /* vi:set ts=4 sw=4:
  2.  *
  3.  * VIM - Vi IMproved        by Bram Moolenaar
  4.  *
  5.  * Do ":help uganda"  in Vim to read copying and usage conditions.
  6.  * Do ":help credits" in Vim to see a list of people who contributed.
  7.  */
  8.  
  9. /*
  10.  * ops.h: Things mostly shared between normal.c, cmdline.c and ops.c
  11.  */
  12.  
  13. /*
  14.  * Operators
  15.  */
  16. #define NOP     0                /* no pending operation */
  17. #define DELETE    1
  18. #define YANK    2
  19. #define CHANGE    3
  20. #define LSHIFT    4                /* left shift */
  21. #define RSHIFT    5                /* right shift */
  22. #define FILTER    6
  23. #define TILDE    7                /* switch case */
  24. #define INDENT    8
  25. #define FORMAT    9
  26. #define COLON    10
  27. #define UPPER    11                /* make upper case */
  28. #define LOWER    12                /* make lower case */
  29. #define JOIN    13                /* only for visual mode */
  30. #define GFORMAT 14                /* "gq" */
  31.  
  32. /*
  33.  * operator characters; the order must correspond to the defines above!
  34.  */
  35. EXTERN char_u *opchars INIT(= (char_u *)"dyc<>!~=Q:UuJq");
  36.  
  37. /*
  38.  * When a cursor motion command is made, it is marked as being a character or
  39.  * line oriented motion. Then, if an operator is in effect, the operation
  40.  * becomes character or line oriented accordingly.
  41.  *
  42.  * Character motions are marked as being inclusive or not. Most char. motions
  43.  * are inclusive, but some (e.g. 'w') are not.
  44.  *
  45.  * Generally speaking, every command in normal() should either clear any pending
  46.  * operator (with CLEAROP), or set the motion type variable.
  47.  */
  48.  
  49. /*
  50.  * Motion types
  51.  */
  52. #define MCHAR    0
  53. #define MLINE    1
  54. #define MBLOCK    2
  55.  
  56. EXTERN int        op_type INIT(= NOP);    /* current pending operator type */
  57. EXTERN int        op_motion_type;            /* type of the current cursor motion */
  58. EXTERN int        op_inclusive;            /* TRUE if char motion is inclusive */
  59. EXTERN int        op_block_mode INIT(= FALSE);
  60.                                     /* current operator is Visual block mode */
  61. EXTERN colnr_t    op_start_vcol;            /* start col for block mode operator */
  62. EXTERN colnr_t    op_end_vcol;            /* end col for block mode operator */
  63. EXTERN int        op_end_adjusted;        /* backuped op_end one char */
  64. EXTERN long        op_line_count;            /* number of lines from op_start to
  65.                                             op_end (inclusive) */
  66. EXTERN int        op_empty;                /* op_start and op_end the same */
  67. EXTERN int        op_is_VIsual;            /* opeartor on visual area */
  68.  
  69. EXTERN int        yankbuffer INIT(= 0);    /* current yank buffer */
  70.